import React from 'react';
import {connect} from 'dva'
// import pageRoutes from 'config/router.config';

import Title from 'components/Title'
import Nav from 'components/Nav'
import TopNavBar from 'components/TopNavBar';

import Indicators from './components/Indicators';
import RealTime from './components/RealTime';

@connect(({index}) => ({...index}))
class Index extends React.Component {

  componentDidMount() {
  }

  render() {
    const { route } = this.props;
    
    const nowRoutes = localStorage.getItem('routeList') ? JSON.parse(localStorage.getItem('routeList')) : [];
    // pageRoutes[0].routes
    return (<>
        <TopNavBar title={route.title} isHide={true}/>
        <Indicators />

        <Title title={'快捷导航'}>
            <Nav className={'col-6'}
              columns={nowRoutes} />
        </Title>

        <RealTime />
      </>)
  }
}

export default Index;
